package jman.teemwork15;

import java.sql.ResultSet;
import java.sql.SQLException;

public class UserDao {
	public User getUserById(String id) throws SQLException{
		User user=new User();
		Dao d=new Dao();
		d.start();
		String sql="select * from user where id='"+id+"'";
		ResultSet rs=d.read(sql);
		while(rs.next()){
			user=new User(id,rs.getString(2),rs.getString(3));
		}
		d.close();
		return user;
	}
}
